-- Tags: no-fasttest

set output_format_pretty_color = 1, output_format_pretty_row_numbers = 0;
set output_format_write_statistics=0;

{% for format in ['CSV', 'TSV', 'XML', 'Vertical', 'Pretty', 'JSON', 'JSONCompact'] -%}

select '{{ format }}';
select sum(number) from numbers(10) group by number % 2 with totals format {{ format }} settings extremes=1;
select '';

{% endfor -%}

select 'Formats without totals and extremes:';

{% for format in ['CustomSeparated', 'JSONEachRow', 'JSONCompactEachRow', 'RowBinary', 'MsgPack', 'Markdown', 'SQLInsert', 'Values', 'TSKV'] -%}

select '{{ format }}';
select sum(number) from numbers(10) group by number % 2 with totals format {{ format }} settings extremes=1;
select '';

{% endfor -%}
